<?

define ("_OBJECT_SITE_PATH", dirname ($_SESSION["PHP_SELF"]));

set_include_path ($_SERVER["DOCUMENT_ROOT"] . ":" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/:" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/include:" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/admin:" . get_include_path ());
set_include_path ($_SERVER["DOCUMENT_ROOT"] .
		"/admin/include:" . get_include_path ());

require_once ("main.include.inc");

global $_OBJECT_IFACE;
global $_GLOBAL_DBH;
global $_OBJECT_IFACE_DISPLAY;
global $_OBJECT_IFACE_PANEL;

list ($_OITC, $_OIT, $_OITP) = array (
		$_OBJECT_IFACE_TABBING_CONTAINER,
		$_OBJECT_IFACE_TABBING,
		$_OBJECT_IFACE_TABBING_PANEL);

list ($_OBJECT_IFACE_TABBING_CONTAINER, $_OBJECT_IFACE_TABBING,
	$_OBJECT_IFACE_TABBING_PANEL) = _app_create_tabbing_container (array (
		tc_tabbing_id=>"tc_tasks_ctl"
));

$_OITP->insert_container ($_OBJECT_IFACE_TABBING_CONTAINER);
$_OBJECT_IFACE_TABBING_CONTAINER->insert_container ($_OBJECT_IFACE_TABBING);
$_OBJECT_IFACE_TABBING_CONTAINER->insert_container ($_OBJECT_IFACE_TABBING_PANEL);

if (!$_REQUEST["fs_tab_modules"] || $_REQUEST["fs_tab_modules"] == "main") {

	require_once ("fs_role_modules.inc");
} elseif ($_REQUEST["fs_tab_modules"] == "rights") {

	if ($_REQUEST["fs_tab_option_modules"] == "fs_rights") {

		require_once ("fs_role_rights.inc");
	} else require_once ("lc_role_rights.inc");
}

if (isset($_REQUEST["role_module_id"]) && ($_REQUEST["role_module_id"] > 0))

	$_OBJECT_TABBING = _app_create_tabbing_object ( array (

	fs_tab_id => "fs_tab_modules",
	fs_tab_key => "role_module_id",
	fs_tab_value => $_REQUEST["role_module_id"],
	fs_tab_default => "main",
	fs_tab_hide_one => true,
	fs_tabs => array (
		array (label=>"Role Module", fs_tab=>"main", wrapper=>"vmc_tab_module",
				options=>"fs_action=view&fs_tab=roles&fs_tab_option=fs_roles&fs_action_modules=view&object_id={$_REQUEST["object_id"]}&role_id={$_REQUEST["role_id"]}"),
		array (label=>"Module Rights", fs_tab=>"rights", wrapper=>"vmc_tab_right",
				options=>"fs_action=view&fs_tab=roles&fs_tab_option=fs_roles&fs_action_modules=view&object_id={$_REQUEST["object_id"]}&role_id={$_REQUEST["role_id"]}"),
	),
));

$_OBJECT_IFACE_TABBING->insert_container ($_OBJECT_TABBING);

list ($_OBJECT_IFACE_TABBING_CONTAINER,
		$_OBJECT_IFACE_TABBING,
		$_OBJECT_IFACE_TABBING_PANEL) =
		array ($_OITC, $_OIT, $_OITP);

?>
